﻿<%@ Page Title="" Language="C#" MasterPageFile="~/localRealTwitterApp.Master" AutoEventWireup="true" CodeBehind="Amis.aspx.cs" Inherits="Twitter.offline.DisplayTweets" %>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
Liste des tweets
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="header" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="pageTitle" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="pageContent" runat="server">
<div class="post_body nicelist">
<ol>
     <% 
         IEnumerable<Twitter.Tweet> lst = getUserTweets();
         bool alt = true;
    if(lst != null)      
        foreach (Twitter.Tweet tw in lst)
        {
            String altClass = alt ? "alt" : "";
            alt = !alt;
   %>
        <li  class="<%=altClass %>">

						<div class="comment_gravatar left">
							<img alt="" src="<%=tw.imgUrl %>" height="32" width="32" />
						</div>

						<div class="comment_author left">
							<span class="comment">
                               @<b><%=tw.User.screenName%></b> <%=tw.User.name %>
                            </span>
							<div class="date"><%=tw.creationDate %></div>
						</div>

						<div class="clearer">&nbsp;</div>
						
						<div class="body">									
							<p><%=tw.text %></p>
						</div>
						<div> <span style="margin-left: 30%">
          <a href="Amis.aspx?userid=<%=userId %>&delete=<%=tw.ID %>"  > Supprimer </a> | <a href="EditTweet.aspx?tweetId=<%=tw.ID %>&text=<%=tw.text %>" > Modifier </a> 
         </span></div>
					</li>		     
     <%} %>
</ol> 
</div>
</asp:Content>
